<template>
  <div style="padding: 0 15px;" @click="toggleClick">
    <svg
      :class="{'is-active':isActive}"
      class="hamburger"
      viewBox="0 0 1024 1024"
      xmlns="http://www.w3.org/2000/svg"
      width="64"
      height="64"
    >
      <path d="M0 0h1024v1024H0z" fill="#515151" opacity=".01" p-id="3194"></path><path d="M921.6 768a51.2 51.2 0 0 1 0 102.4H102.4a51.2 51.2 0 0 1 0-102.4h819.2zM240.9984 394.5984A51.2 51.2 0 0 1 256 430.7968v162.4064a51.2 51.2 0 0 1-87.3984 36.1984l-81.2032-81.2032a51.2 51.2 0 0 1 0-72.3968l81.2032-81.2032a51.2 51.2 0 0 1 72.3968 0zM921.6 460.8a51.2 51.2 0 0 1 0 102.4H409.6a51.2 51.2 0 0 1 0-102.4h512z m0-307.2a51.2 51.2 0 0 1 0 102.4H102.4a51.2 51.2 0 1 1 0-102.4h819.2z" fill="#515151" p-id="3195"/>
    </svg>
  </div>
</template>

<script>
export default {
  name: 'Hamburger',
  props: {
    isActive: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    toggleClick() {
      this.$emit('toggleClick')
    }
  }
}
</script>

<style scoped>
.hamburger {
  display: inline-block;
  vertical-align: middle;
  width: 20px;
  height: 20px;
}

.hamburger.is-active {
  transform: rotate(180deg);
}
</style>
